package com.young.dynamicexcel.service;

import com.young.dynamicexcel.common.dto.DynamicExcelParam;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;


/**
 * @DESCRIPTION: excel动态导入导出service接口
 * @USER: Young
 */
public interface DynamicExcelService {

    void exportExcelByDatabase(String tableName, String fileName, boolean isTemplate, HttpServletRequest request, HttpServletResponse response) throws Exception;

    void importExcelByDatabase(String tableName, InputStream fileInputStream) throws Exception;

//    <T> void exportExcelByEntity(Object entity, String excelName, Map<String, String> headMap, HttpServletResponse response);

    void exportExcelByEntity(DynamicExcelParam dynamicExcelParam, HttpServletRequest request, HttpServletResponse response) throws Exception;

    void importExcelByEntity(String entityName, InputStream fileInputStream) throws Exception;
}
